package com.hitrust.gs.action;

import java.util.HashMap;

import com.hitrust.gs.bean.GSOperatorBean;
import com.hitrust.gs.business.GSOrderDeptInfoProcessor;
import com.hitrust.gs.lib.GSBaseConstants;
import com.hitrust.gs.lib.GSLogWriter;
import com.hitrust.gs.service.GSBaseAction;
import com.hitrust.gs.service.GSBaseForm;

public class GSUnBalanceDetailAction extends GSBaseAction {

	public String execute(GSBaseForm aForm) throws Exception {
        try{
            //取得当前操作员可查询的订货单位和送货地址
            GSOperatorBean tOperBean = (GSOperatorBean)aForm.getSession().getAttribute(GSBaseConstants.LOGIN);
            GSOrderDeptInfoProcessor tOrderDeptProc = new GSOrderDeptInfoProcessor();
            HashMap tMap = tOrderDeptProc.getOrderDeptInfoOfBusOper(tOperBean.getGs_oper_org_id());
            aForm.getRequest().setAttribute("orderdept",tMap);
    
            String aDeptId  = aForm.getRequest().getParameter("deptId");
            String aBalanceYM = aForm.getRequest().getParameter("balanceYM");
            aForm.getRequest().setAttribute("deptId",aDeptId);
            aForm.getRequest().setAttribute("balanceYM",aBalanceYM);
        }catch(Exception e){
            aForm.getRequest().setAttribute("window","true");
            GSLogWriter.error(this,e.toString());
            throw e;
        }
        return "orderdeptdetail";
	}

}
